package com.lxxie.test;

/**
 * Created by xielx on 2021/8/17.
 */
public enum WaringTypeEnum implements  IllegalWaringType{
    LOCAL(WaringMainEnum.LSWFWCL,"1","本地"),
    OTHER_CITY(WaringMainEnum.LSWFWCL,"2","外市"),
    OTHER_PROVINCE(WaringMainEnum.LSWFWCL,"3","外省"),
    YZSFRYXYCL(WaringMainEnum.CRJGK,"1","运载三非人员嫌疑车辆"),
    SXQ(WaringMainEnum.JSZXXYC,"A","实习期"),
    XD(WaringMainEnum.JSZXXYC,"B","吸毒"),
    CF(WaringMainEnum.JSZXXYC,"E","超分"),
    ZK(WaringMainEnum.JSZXXYC,"F","暂扣"),
    DX(WaringMainEnum.JSZXXYC,"G","吊销"),
    ZX(WaringMainEnum.JSZXXYC,"H","注销"),
    YQWHZ(WaringMainEnum.JSZXXYC,"I","逾期未换证"),
    YQWSY(WaringMainEnum.JSZXXYC,"J","逾期未审验"),
    KY(WaringMainEnum.JSZXXYC,"K","扣押"),
    ZJBF(WaringMainEnum.JSZXXYC,"M","准驾不符"),
    JJ(WaringMainEnum.JSZXXYC,"R","降级"),
    WZ(WaringMainEnum.JSZXXYC,"T","无证"),
    CX(WaringMainEnum.JSZXXYC,"V","撤销"),
    TZSY(WaringMainEnum.JSZXXYC,"W","停止使用"),
    KL(WaringMainEnum.JSZXXYC,"X","扣留"),
    GLKC(WaringMainEnum.ZDCL,"1","公路客车"),
    LYKC(WaringMainEnum.ZDCL,"2","旅游客车"),
    ZD_WXPYSC(WaringMainEnum.ZDCL,"4","危险品运输车"),
    XC(WaringMainEnum.ZDCL,"5","校车"),
    LTC(WaringMainEnum.ZDCL,"6","绿通车"),
    YZFCL(WaringMainEnum.ZDCL,"L","营转非车辆"),
    GRMXDKC(WaringMainEnum.ZDCL,"M","个人名下大客车"),
    LSCYMBC(WaringMainEnum.ZDCL,"O","历史超员面包车"),
    LSFXCYJFZJD_PT(WaringMainEnum.ZDCL,"P","历史非现场应记分值较多（普通）"),
    LSFXCYJFZJD_YZ(WaringMainEnum.ZDCL,"Q","历史非现场应记分值较多（严重）"),
    LSFFGZMBC(WaringMainEnum.ZDCL,"R","历史非法改装面包车"),
    ZD_WSQZYSDKC(WaringMainEnum.ZDCL,"S","五十七座以上大客车"),
    ZD_WPKC(WaringMainEnum.ZDCL,"T","卧铺客车"),
    YX(WaringMainEnum.ZXCL,"V","有效"),
    GQ(WaringMainEnum.ZXCL,"W","过期"),
    JSRBXAQD(WaringMainEnum.YXAQJSXW,"1","驾驶人不系安全带"),
    JSRBDSJ(WaringMainEnum.YXAQJSXW,"2","驾驶人拨打手机"),
    FJSBXAQD(WaringMainEnum.YXAQJSXW,"3","副驾驶不系安全带"),
    BDTK(WaringMainEnum.YXAQJSXW,"4","不戴头盔"),
    XCWQDXCBP(WaringMainEnum.FWTJXCWF,"1","校车未取得校车标牌"),
    FXCTGXCFWXY(WaringMainEnum.FWTJXCWF,"2","非校车提供校车服务嫌疑"),
    HYKC_QG(WaringMainEnum.WFJZTXGD,"1","红眼客车(全国)"),
    HYKC_BS(WaringMainEnum.WFJZTXGD,"2","红眼客车(本省)"),
    WXPYSC(WaringMainEnum.WFJZTXGD,"3","危险品运输车"),
    JDHXPYSC(WaringMainEnum.WFJZTXGD,"4","剧毒化学品运输车"),
    HC(WaringMainEnum.WFJZTXGD,"5","货车"),
    WDC(WaringMainEnum.WFJZTXGD,"6","外地车"),
    HBC(WaringMainEnum.WFJZTXGD,"7","黄标车"),
    WFZYCDCL(WaringMainEnum.WFJZTXGD,"8","违法占用车道车辆"),
    WHXXCL(WaringMainEnum.WFJZTXGD,"9","尾号限行车辆"),
    YZFKC(WaringMainEnum.WFJZTXGD,"A","营转非客车"),
    WSQZYSDKC(WaringMainEnum.WFJZTXGD,"B","五十七座以上大客车"),
    WPKC(WaringMainEnum.WFJZTXGD,"C","卧铺客车"),
    ZDHP(WaringMainEnum.XYWP,"1","遮挡号牌"),
    WSHP(WaringMainEnum.XYWP,"2","污损号牌"),
    WZTLSHP(WaringMainEnum.XYWP,"3","未粘贴临时号牌"),
    CZCNZZLXGC(WaringMainEnum.XNYQCGK,"1","车载储能装置类型过充"),
    KCDCNXTBPPBJ(WaringMainEnum.XNYQCGK,"10","可充电储能系统不匹配报警"),
    SOCTBBJ(WaringMainEnum.XNYQCGK,"11","SOC跳变报警"),
    SOCGGBJ(WaringMainEnum.XNYQCGK,"12","SOC过高报警"),
    DTDCQYBJ(WaringMainEnum.XNYQCGK,"13","单体电池欠压报警"),
    DTDCGYBJ(WaringMainEnum.XNYQCGK,"14","单体电池过压报警"),
    SOCDBJ(WaringMainEnum.XNYQCGK,"15","SOC低报警"),
    CZCNZZLXQYBJ(WaringMainEnum.XNYQCGK,"16","车载储能装置类型欠压报警"),
    CZCNZZLXGYBJ(WaringMainEnum.XNYQCGK,"17","车载储能装置类型过压报警"),
    DCGWBJ(WaringMainEnum.XNYQCGK,"18","电池高温报警"),
    WDCYBJ(WaringMainEnum.XNYQCGK,"19","温度差异报警"),
    QDDJWDBJ(WaringMainEnum.XNYQCGK,"2","驱动电机温度报警"),
    SDYCBJ(WaringMainEnum.XNYQCGK,"20","速度异常报警"),
    GYHSZTBJ(WaringMainEnum.XNYQCGK,"3","高压互锁状态报警"),
    QDDJKZQWDBJ(WaringMainEnum.XNYQCGK,"4","驱动电机控制器温度报警"),
    DC_DCZTBJ(WaringMainEnum.XNYQCGK,"5","DC-DC状态报警"),
    ZDXTBJ(WaringMainEnum.XNYQCGK,"6","制动系统报警"),
    DC_DCWDBJ(WaringMainEnum.XNYQCGK,"7","DC-DC温度报警"),
    JYBJ(WaringMainEnum.XNYQCGK,"8","绝缘报警"),
    DLXDCYZXCBJ(WaringMainEnum.XNYQCGK,"9","动力蓄电池一致性差报警"),
    CQBZBDXS(WaringMainEnum.TXGJYCKC,"1","长期不在本地行驶"),
    KDXSFYY(WaringMainEnum.TXGJYCKC,"2","跨地行驶非营运"),
    CJLKSXS(WaringMainEnum.TXGJYCKC,"3","长距离跨省行驶"),
    XLGDKC(WaringMainEnum.TXGJYCKC,"4","线路固定客车"),
    XLBGDKC(WaringMainEnum.TXGJYCKC,"5","线路不固定客车"),
    NCDQPFTXMBC(WaringMainEnum.TXGJYCKC,"6","农村地区频繁通行面包车"),
    ZD_XD(WaringMainEnum.ZDGZWR,"A","吸毒"),
    ZT(WaringMainEnum.ZDGZWR,"B","在逃"),
    RGBK(WaringMainEnum.ZDGZWR,"C","人工布控"),
    DEFAULT(WaringMainEnum.QT,"Z","未知");
    
    WaringMainEnum mainEnum;
    String code;
    String desc;
    
    WaringTypeEnum(WaringMainEnum mainEnum, String code, String desc) {
        this.mainEnum = mainEnum;
        this.code = code;
        this.desc = desc;
    }
    
    public static IllegalWaringType getInstance(String yjlx,String yjzlx){
        for (WaringTypeEnum value : values()) {
            if (value.mainEnum.code.equals(yjlx) && value.code.equals(yjzlx)) {
                return value;
            }
        }
        for (WaringMainEnum value : WaringMainEnum.values()) {
            if (value.code.equals(yjlx)) {
                return value;
            }
        }
        return DEFAULT;
    }

    public WaringMainEnum getMainEnum() {
        return mainEnum;
    }

    public String getDescStr(){
        return mainEnum.desc+"("+desc+")";
    }

    @Override
    public String getCode() {
        return code;
    }

    @Override
    public String getDesc() {
        return desc;
    }

    public enum WaringMainEnum implements IllegalWaringType{
        SGTY("01", "事故逃逸"),
        TPXY("02", "套牌嫌疑"),
        JP("03", "假牌"),
        YQWNJ("04", "逾期未年检"),
        YQWBF("05", "逾期未报废"),
        LSWFWCL("06", "历史违法记录未处理"),
        SSFXCWF("07", "实时非现场交通违法"),
        WHPCWAZQDZZ("09", "危化品车未安装切断装置"),
        QXCG("10", "强行闯卡"),
        SSTPXY("11", "实时套牌嫌疑"),
        YQWTB("12", "逾期未投保"),
        XSAJ("21", "刑事案件"),
        ZDZAWJ("22", "重大治安案件"),
        WFFZXYGTGJ("23", "违法犯罪嫌疑交通工具"),
        BDQJDCL("24", "被盗抢机动车辆"),
        ZACTGK("25", "治安常态管控"),
        FWJCYGK("26", "法院检察院管控"),
        CRJGK("27", "出入境管控"),
        WSBHPCL("31", "未识别号牌车辆"),
        TSGZSSCL("32", "特殊关注省市车辆"),
        JSZXXYC("34", "驾驶证信息异常"),
        ZDCL("35", "重点车辆"),
        ESCWAGDBLZYDJ("37", "二手车未按规定办理转移登记"),
        ZXCL("38", "自学车辆"),
        HBCGK("43", "黄标车管控"),
        YXAQJSXW("45", "影响安全驾驶行为"),
        FWTJXCWF("46", "非法提供校车服务"),
        WFJZTXGD("48", "违反禁止通行规定"),
        XYWP("49", "嫌疑无牌"),
        XNYQCGK("51", "新能源汽车管控"),
        TXGJYCKC("61", "通行轨迹异常客车"),
        PLJSXYCL("62", "疲劳驾驶嫌疑车辆"),
        XYWFZWCL("63", "嫌疑违法载人车辆"),
        YSCYCL("64", "疑似超员车辆"),
        ZDGZWR("65", "重点关注人员"),
        YQGKCL("98", "疫情管控车辆"),
        QT("99", "其他");
        String code;
        String desc;
        WaringMainEnum(String code, String desc) {
            this.code = code;
            this.desc = desc;
        }

        @Override
        public String getCode() {
            return code;
        }

        @Override
        public String getDesc() {
            return desc;
        }

        @Override
        public String getDescStr() {
            return desc;
        }
    }
}
